<?php
require_once '../lib/DBClass.php';

session_start();

$u = $_POST['usr'];
$p = $_POST['pwd'];

$acc = new Account();
$usr = 'tdx.street@gmail.com';
$pwd = 'start3r';

if($u=='' || $p==''){
	echo '<script>';
	echo "alert('Error: User atau Password tidak boleh kosong');";
	echo "window.location='login.html'";
	echo '</script>';
}else{
	
	if($u==$usr && $p==$pwd){
		
		$_SESSION['session_usr']= $u;
		echo '<script>';
		echo "alert('Success: Anda berhasil login sebagai admin');";
		echo "window.location='index.php'";
		echo '</script>';

	}else{
	
		echo '<script>';
		echo "alert('Error: User dan Password tidak sesuai');";
		echo "window.location='login.html'";
		echo '</script>';
		
	}

}

?>


